package com.boyoi.frame.system.controller;

import com.boyoi.frame.server.domain.User;
import com.boyoi.frame.server.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class TestController {

    @Resource
    private UserService userService;

    @RequestMapping("/test")
    public String test() {
        return "SUCCESS";
    }

    /**
     * 查询用户列表示例
     *
     * @return
     */
    @RequestMapping("/user")
    public List<User> user() {

        return userService.userlist();
    }
}
